package command;

import pojo.User;

public abstract class CommandFactory {

	public static enum CommandCode {
		// System
		QUIT, EXIT, HELP, LOGIN, SELECTBYCODE, SELECTBYID, SELECTBYNAME, LIST, 

		// USER
		ADD, DELETE, LOGOUT, UPDATE, RESET
	}

	public static CommandFactory buildFactory(User user) {
		if (user == null) {
			return new SystemCommandFactory();
		}
		return new UserCommandFactory(user);
	}

	public abstract Command buildCommand(CommandCode cmd);

}
